package com.elgenring.basic.service;

import com.elgenring.basic.query.BaseQuery;
import com.elgenring.basic.utils.PageList;

import java.util.List;

public interface IBaseService<T> {


    /**
     * @Title: loadAll
     * @Description: 查询所有
     * @Author: Atlas
     * @Version: 1.0
     * @Date:  2022/6/21 21:21
     * @Parameters:
     * @Return
     */
    List<T> loadAll ();


    /**
     * @Description: 查询单个
     * @Author: Atlas
     * @Version: 1.0
     * @Date:  2022/6/21 21:21
     */
    T loadById (Long id);


    /**
     * @Title: save
     * @Description: Atlas
     * @Author: Atlas
     * @Version: 1.0
     * @Date:  2022/6/21 21:22
     * @Parameters:
     * @Return
     */
    void save (T t);

    /**
     * @Title: remove
     * @Description: 删除单个
     * @Author: Atlas
     * @Version: 1.0
     * @Date:  2022/6/21 21:23
     * @Parameters:
     * @Return
     */
    void remove (Long id);

    /**
     * @Title: update
     * @Description: 修改
     * @Author: Atlas
     * @Version: 1.0
     * @Date:  2022/6/21 21:23
     * @Parameters:
     * @Return
     */
    void update (T t);

    /**
     * @Title: queryData
     * @Description: 封装内容数量与数据
     * @Author: Atlas
     * @Version: 1.0
     * @Date:  2022/6/21 21:23
     * @Parameters:
     * @Return
     */
    PageList<T> queryData(BaseQuery baseQuery);

    /**
     * @Title:
     * @Description: 批量删除
     * @Author: Atlas
     * @Version: 1.0
     * @Date:  2022/6/25 19:44
     * @Parameters: 前端批量删除得到参数
     * @Return  AjaxResult
     */
    void batRemove(Long[] ids);
}
